package mobi.hami.huapin.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ProductShowAttributeExample {
    /**
     * product_show_attribute
     */
    protected String orderByClause;

    /**
     * product_show_attribute
     */
    protected boolean distinct;

    /**
     * product_show_attribute
     */
    protected List<Criteria> oredCriteria;

    public ProductShowAttributeExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * product_show_attribute 2018-08-23
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andSpu_idIsNull() {
            addCriterion("spu_id is null");
            return (Criteria) this;
        }

        public Criteria andSpu_idIsNotNull() {
            addCriterion("spu_id is not null");
            return (Criteria) this;
        }

        public Criteria andSpu_idEqualTo(Integer value) {
            addCriterion("spu_id =", value, "spu_id");
            return (Criteria) this;
        }

        public Criteria andSpu_idNotEqualTo(Integer value) {
            addCriterion("spu_id <>", value, "spu_id");
            return (Criteria) this;
        }

        public Criteria andSpu_idGreaterThan(Integer value) {
            addCriterion("spu_id >", value, "spu_id");
            return (Criteria) this;
        }

        public Criteria andSpu_idGreaterThanOrEqualTo(Integer value) {
            addCriterion("spu_id >=", value, "spu_id");
            return (Criteria) this;
        }

        public Criteria andSpu_idLessThan(Integer value) {
            addCriterion("spu_id <", value, "spu_id");
            return (Criteria) this;
        }

        public Criteria andSpu_idLessThanOrEqualTo(Integer value) {
            addCriterion("spu_id <=", value, "spu_id");
            return (Criteria) this;
        }

        public Criteria andSpu_idIn(List<Integer> values) {
            addCriterion("spu_id in", values, "spu_id");
            return (Criteria) this;
        }

        public Criteria andSpu_idNotIn(List<Integer> values) {
            addCriterion("spu_id not in", values, "spu_id");
            return (Criteria) this;
        }

        public Criteria andSpu_idBetween(Integer value1, Integer value2) {
            addCriterion("spu_id between", value1, value2, "spu_id");
            return (Criteria) this;
        }

        public Criteria andSpu_idNotBetween(Integer value1, Integer value2) {
            addCriterion("spu_id not between", value1, value2, "spu_id");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameIsNull() {
            addCriterion("attribute_name is null");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameIsNotNull() {
            addCriterion("attribute_name is not null");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameEqualTo(String value) {
            addCriterion("attribute_name =", value, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameNotEqualTo(String value) {
            addCriterion("attribute_name <>", value, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameGreaterThan(String value) {
            addCriterion("attribute_name >", value, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameGreaterThanOrEqualTo(String value) {
            addCriterion("attribute_name >=", value, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameLessThan(String value) {
            addCriterion("attribute_name <", value, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameLessThanOrEqualTo(String value) {
            addCriterion("attribute_name <=", value, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameLike(String value) {
            addCriterion("attribute_name like", value, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameNotLike(String value) {
            addCriterion("attribute_name not like", value, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameIn(List<String> values) {
            addCriterion("attribute_name in", values, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameNotIn(List<String> values) {
            addCriterion("attribute_name not in", values, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameBetween(String value1, String value2) {
            addCriterion("attribute_name between", value1, value2, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_nameNotBetween(String value1, String value2) {
            addCriterion("attribute_name not between", value1, value2, "attribute_name");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueIsNull() {
            addCriterion("attribute_value is null");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueIsNotNull() {
            addCriterion("attribute_value is not null");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueEqualTo(String value) {
            addCriterion("attribute_value =", value, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueNotEqualTo(String value) {
            addCriterion("attribute_value <>", value, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueGreaterThan(String value) {
            addCriterion("attribute_value >", value, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueGreaterThanOrEqualTo(String value) {
            addCriterion("attribute_value >=", value, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueLessThan(String value) {
            addCriterion("attribute_value <", value, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueLessThanOrEqualTo(String value) {
            addCriterion("attribute_value <=", value, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueLike(String value) {
            addCriterion("attribute_value like", value, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueNotLike(String value) {
            addCriterion("attribute_value not like", value, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueIn(List<String> values) {
            addCriterion("attribute_value in", values, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueNotIn(List<String> values) {
            addCriterion("attribute_value not in", values, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueBetween(String value1, String value2) {
            addCriterion("attribute_value between", value1, value2, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andAttribute_valueNotBetween(String value1, String value2) {
            addCriterion("attribute_value not between", value1, value2, "attribute_value");
            return (Criteria) this;
        }

        public Criteria andGmt_createIsNull() {
            addCriterion("gmt_create is null");
            return (Criteria) this;
        }

        public Criteria andGmt_createIsNotNull() {
            addCriterion("gmt_create is not null");
            return (Criteria) this;
        }

        public Criteria andGmt_createEqualTo(Date value) {
            addCriterion("gmt_create =", value, "gmt_create");
            return (Criteria) this;
        }

        public Criteria andGmt_createNotEqualTo(Date value) {
            addCriterion("gmt_create <>", value, "gmt_create");
            return (Criteria) this;
        }

        public Criteria andGmt_createGreaterThan(Date value) {
            addCriterion("gmt_create >", value, "gmt_create");
            return (Criteria) this;
        }

        public Criteria andGmt_createGreaterThanOrEqualTo(Date value) {
            addCriterion("gmt_create >=", value, "gmt_create");
            return (Criteria) this;
        }

        public Criteria andGmt_createLessThan(Date value) {
            addCriterion("gmt_create <", value, "gmt_create");
            return (Criteria) this;
        }

        public Criteria andGmt_createLessThanOrEqualTo(Date value) {
            addCriterion("gmt_create <=", value, "gmt_create");
            return (Criteria) this;
        }

        public Criteria andGmt_createIn(List<Date> values) {
            addCriterion("gmt_create in", values, "gmt_create");
            return (Criteria) this;
        }

        public Criteria andGmt_createNotIn(List<Date> values) {
            addCriterion("gmt_create not in", values, "gmt_create");
            return (Criteria) this;
        }

        public Criteria andGmt_createBetween(Date value1, Date value2) {
            addCriterion("gmt_create between", value1, value2, "gmt_create");
            return (Criteria) this;
        }

        public Criteria andGmt_createNotBetween(Date value1, Date value2) {
            addCriterion("gmt_create not between", value1, value2, "gmt_create");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedIsNull() {
            addCriterion("gmt_modified is null");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedIsNotNull() {
            addCriterion("gmt_modified is not null");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedEqualTo(Date value) {
            addCriterion("gmt_modified =", value, "gmt_modified");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedNotEqualTo(Date value) {
            addCriterion("gmt_modified <>", value, "gmt_modified");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedGreaterThan(Date value) {
            addCriterion("gmt_modified >", value, "gmt_modified");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedGreaterThanOrEqualTo(Date value) {
            addCriterion("gmt_modified >=", value, "gmt_modified");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedLessThan(Date value) {
            addCriterion("gmt_modified <", value, "gmt_modified");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedLessThanOrEqualTo(Date value) {
            addCriterion("gmt_modified <=", value, "gmt_modified");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedIn(List<Date> values) {
            addCriterion("gmt_modified in", values, "gmt_modified");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedNotIn(List<Date> values) {
            addCriterion("gmt_modified not in", values, "gmt_modified");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedBetween(Date value1, Date value2) {
            addCriterion("gmt_modified between", value1, value2, "gmt_modified");
            return (Criteria) this;
        }

        public Criteria andGmt_modifiedNotBetween(Date value1, Date value2) {
            addCriterion("gmt_modified not between", value1, value2, "gmt_modified");
            return (Criteria) this;
        }
    }

    /**
     * product_show_attribute
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    /**
     * product_show_attribute 2018-08-23
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}